package com.itheima.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

// @WebFilter("/demo01")
public class FilterChain01 implements Filter {
    public void destroy() {
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("第一个过滤器, 放行前代码");

        chain.doFilter(req, resp); // 放行

        System.out.println("第一个过滤器, 放行后代码");
    }

    public void init(FilterConfig config) throws ServletException {

    }

}
